from settings.publicvar import Base
from sqlalchemy import String
from sqlalchemy.orm import Mapped,mapped_column
from typing_extensions import Annotated

int_pk = Annotated[int,mapped_column(primary_key=True)]
nameset = Annotated[str,mapped_column(String(15),nullable=True)]

class Person(Base):
    __tablename__='person'

    id:Mapped[int_pk]
    name:Mapped[nameset]
    IDcard:Mapped[str] = mapped_column(String(18),nullable=False,unique=True)
    iphone:Mapped[str] = mapped_column(String(11),nullable=False,unique=True)
    mark:Mapped[str] = mapped_column(String(150),nullable=True)
